# 问题2模板：
# P301-2.py
# 请在.....处填写多行表达式或语句
# 可以修改其他代码


def display():
    fi = open("address.txt", 'r')
    for i in fi:
        print(i.strip('\n'))


menu = ["1. 显示所有信息", "2. 追加信息", "3. 删除信息"]
for i in menu:
    print(i)
while True:
    try:
        ch = int(input("请输入数字1-3选择功能："))
        if ch in [1, 2, 3]:
            break
    except:
        print("输入错误,请重新输入!")
print("您选择了功能", ch)

if ch == 1:
    display()
elif ch == 2:
    pass
elif ch == 3:
    pass
